package com;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-06-12
 * Time: 15:21
 */
class A{
    public static int age = 2;
    public int ret = 1;
    static {//静态代码块
        System.out.println(age);
        age = 4;
        System.out.println("静态代码块执行中...");
    }
    {//实例代码块
        System.out.println(ret);
        ret = 4;
        System.out.println(ret);
        System.out.println("实例代码块执行中...");
    }

    public A(){//构造方法
        System.out.println("构造方法执行中...");
    }
}
public class Test {
    public static void main(String[] args) {
        System.out.println(A.age);
//        A a1 = new A();
//
//        A a2 = new A();
    }
}
